package com.loadmore.common.widget;

import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;

import androidx.appcompat.widget.AppCompatTextView;

public class IconView extends AppCompatTextView {
    public IconView(Context context) {
        this(context,null);
    }

    public IconView(Context context, AttributeSet attrs) {
        this(context, attrs,0);
    }

    public IconView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        setFont(defStyleAttr);
    }
    private void setFont(int defStyleAttr) {
        Typeface typeface = Typeface.createFromAsset(getResources().getAssets(),"iconfont/iconfont.ttf");
        setTypeface(typeface, defStyleAttr);
    }
}
